﻿using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using QMERP.Domain.Entities;

namespace QMERP.Infrastructure.EFCore.Mappings
{
    public class StockDetailMapping : IEntityTypeConfiguration<StockDetail>
    {
        public void Configure(EntityTypeBuilder<StockDetail> builder)
        {
            builder.Property(x => x.DegreesType).HasMaxLength(5);
            builder.Property(x => x.SPH);
            builder.Property(x => x.CYL);
            builder.Property(x => x.Qty);
            builder.Property(x => x.BasicQty);
            builder.Property(x => x.StockId);

            builder.HasIndex(x => x.Id);
            builder.HasIndex(x => x.StockId);
        }
    }
}
